<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
 * 调动任务表
 */
class CreateMoveTaskTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('move_task', function (Blueprint $table) {
            $table->increments('id');
	        $table->integer('type')->comment('任务类型');
	        $table->integer('to_store_id')->comment('调入部门id');
	        $table->integer('from_store_id')->comment('调出部门id')->nullable();
	        $table->integer('from_staff_id')->comment('调出人员id')->nullable();
	        $table->integer('to_store_station_id')->comment('支援岗位id');
	        $table->date('start_day')->comment('支援开始日期');
	        $table->date('end_day')->comment('支援结束时间');
	        $table->time('start_time')->comment('支援开始时间');
	        $table->time('end_time')->comment('支援结束时间');
	        $table->text('comment')->comment('任务描述');
	        $table->tinyInteger('status')->comment('是否发布：0未发布，1已发布');
	        $table->integer('is_agree')->comment('审核：1申请中，2已同意，3不通过')->default(1);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('move_task');
    }
}
